from typing import Optional
from axiom_boot.scraper.models import Item


class SupplierItem(Item):
    """
    一个统一的数据模型，用于存储从各个页面抓取到的所有供应商信息。
    """
    # 优先级 1: 核心联系信息
    company_name: Optional[str] = None
    contact_person_name: Optional[str] = None
    contact_person_title: Optional[str] = None
    telephone: Optional[str] = None
    mobile_phone: Optional[str] = None
    address: Optional[str] = None
    company_url: Optional[str] = None
    contact_url: Optional[str] = None

    # 优先级 2: 公司关键档案
    business_type: Optional[str] = None
    main_products: Optional[str] = None
    year_of_establishment: Optional[str] = None
    number_of_employees: Optional[str] = None
    registered_capital: Optional[str] = None
    is_audited_supplier: bool = False

    # 优先级 3: 贸易能力
    main_markets: Optional[str] = None
    export_year: Optional[str] = None
    incoterms: Optional[str] = None
    terms_of_payment: Optional[str] = None
    average_lead_time: Optional[str] = None
    number_of_foreign_trading_staff: Optional[str] = None
    nearest_port: Optional[str] = None

    # 优先级 4: 生产与研发
    plant_area: Optional[str] = None
    production_lines: Optional[str] = None
    oem_service_available: Optional[bool] = None
    odm_service_available: Optional[bool] = None
    r_and_d_engineers: Optional[str] = None
    production_machines: Optional[str] = None

    # 优先级 5: 其他信息
    management_system_certification: Optional[str] = None
    repeat_buyers_choice: Optional[str] = None
    cooperated_with_fortune_500: Optional[str] = None 